package tests.fakes;

import java.util.ArrayList;
import java.util.List;

import jeconbond.economic.production.IResourceNecessityInformer;
import jeconbond.economic.resources.IResourceType;
import jeconbond.economic.resources.ResourceBasket;

public class WoodIsNecessary implements IResourceNecessityInformer {
	private IResourceType wood;
	private IResourceType oil;
	private int oilLevel;

	public WoodIsNecessary(IResourceType wood) {
		this.wood = wood;
	}

	public List<InfoItem> listInfoItems() {
		List<InfoItem> list = new ArrayList<InfoItem>();
		list.add(new InfoItem(new ResourceBasket(wood, 1.0), 0));
		if (oil != null) {
			list.add(new InfoItem(new ResourceBasket(oil, 1.0), oilLevel));
		}
		return list;
	}

	public void setOilPriority(IResourceType oil, int oilLevel) {
		this.oil = oil;
		this.oilLevel = oilLevel; 
	}
}
